<!DOCTYPE html>
<html>
<head>
    <!--购物车-->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <title>确认订单</title>
    <link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="addre-wrapper">
    <div id="addressTitle" class="title bottom-border">收货地址</div>
    <!-- <a href="add-address.html" class="null">新增地址</a> -->
    <a id="btnAddress" href="address.html" class="addre">
        <div class="name-add">
            <div id="uname" class="name">暂无</div>
            <div id="addressName" class="add">暂无</div>
        </div>
        <div class="next"></div>
    </a>
</div>
<!-- 收货地址 -->

<div id="pList" class="order-list">
    <!---->
    <!--<a href="javascript:;" class="order-item bottom-border">-->
    <!--<img src="img/img.png" alt="" class="img">-->
    <!--<div class="text">-->
    <!--<div class="name">酸甜可口的青提酸甜可口的青提酸甜可口的青   500g</div>-->
    <!--<div class="specific">500g<i>青色</i></div>-->
    <!--</div>-->
    <!--<div class="price-num">-->
    <!--<div class="price"><i>￥</i>22.5</div>-->
    <!--<div class="num">X 2</div>-->
    <!--</div>-->
    <!--</a>-->
    <!--<a href="javascript:;" class="order-item bottom-border">-->
    <!--<img src="img/img.png" alt="" class="img">-->
    <!--<div class="text">-->
    <!--<div class="name">酸甜可口的青提酸甜可口的青提酸甜可口的青   500g</div>-->
    <!--<div class="specific">500g</div>-->
    <!--</div>-->
    <!--<div class="price-num">-->
    <!--<div class="price"><i>￥</i>22.5</div>-->
    <!--<div class="num">X 2</div>-->
    <!--</div>-->
    <!--</a>-->
    <!---->
</div>
<!-- 商品列表 -->

<div class="ji-you">
    <a href="#" class="jiyou-item you bottom-border">
        <div class="title">优惠券</div>
        <div class="text next-icon">未使用</div>
    </a>
    <a href="javascript:;" class="jiyou-item bottom-border">
        <div class="title">购买可得积分</div>
        <div id="canGetScore" class="text">0积分</div>
    </a>
</div>
<!-- 积分优惠卷 -->

<div class="order-other">
    <div onclick="toPeisong()" class="peisong">
        <a href="#" class="title-wrapper bottom-border">
            <!-- 无服务点 service-add2.html-->
            <div class="title">选择就近服务点</div>
            <div class="text next-icon"></div>
        </a>
        <div id="fwd" class="content bottom-border">
            <div class="addr">该城市暂无入驻的服务点，系统默认发货方式为快递。</div>
            <div class="addr"></div>
            <div class="addr"></div>
        </div>
    </div>
    <!--  -->
    <div class="other-item bottom-border">
        <div class="title">发货方式</div>
        <div id="fhfs" class="text">快递</div>
    </div>
    <!--  -->
    <div class="other-item bottom-border">
        <div class="title">运费</div>
        <div id="serviceFee" class="text">¥2.00</div>
    </div>
    <!--  -->
    <div class="other-item checkbox bottom-border">
        <div class="title">配送点自提</div>
        <div class="checkbox"></div>
    </div>
    <!--  -->
    <div class="other-item mess-wrapper bottom-border">
        <div class="title">留言</div>
        <input type="text" name="" value="" placeholder="选填：对本次交易的说明">
    </div>
    <!--  -->
</div>

<div class="cost-list">
    <div class="other-item bottom-border">
        <div class="title">商品金额</div>
        <div id="proFee" class="text"></div>
    </div>
    <!--  -->
</div>
<!-- 花费列表 -->

<!--<div class="other-item checkbox ji-checkbox">-->
<!--<div class="title">余200积分可抵扣<i>¥2.00</i></div>-->
<!--<div class="checkbox"></div>-->
<!--</div>-->
<!-- 积分抵扣 -->

<div class="order-menu-section">

    <div class="order-menu bottom-border">
        <div class="text">
            <div class="cost">总金额:￥<i id="totalFee">0</i></div>
            <div class="num">（共<i id="totalNum"></i>件商品）</div>
        </div>
        <a href="#" id="submitBtn" class="button">提交订单</a>
    </div>
    <div class="zhanwei"></div>
</div>
<!-- 底部菜单 -->


<!-- 以下为页面js部分 -->

<script src="js/layers/layer.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="js/rem.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script src="js/pages/public.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript" src="js/pages/carToOrder.js"></script>
<script>
    $('.checkbox').click(function () {
        if ($(this).hasClass('on')) {
            $(this).removeClass('on');
            $('#totalFee').text(totalFee);
            $('#fhfs').text("品行专送");
            isSince = null;
        } else {
            $(this).addClass('on');
            $('#totalFee').text(fee);
            $('#fhfs').text("自提");
            isSince = 1;
        }
    })

    $('#submitBtn').click(function () {
        if (addressId == 0) {
            alertMsg("请填写地址");
            return;
        }
        $.ajax({
            type: "post",
            url: ajaxUrl + "/mobile/order/carToOrder",
            async: true,
            data: {'carIds': carIds, 'memberId': memberId, 'addressId': addressId, 'serviceId': serviceId, 'memo': ' '},
            success: function (data) {
                window.location.href = '/payment.html?orderId=' + data.result.orderId + "&totalFee=" + data.result.totalFee;
            }
        });
    });
    // 是否自提和积分抵扣
</script>
</body>
</html>